<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>方法</title>
</head>

<body>

</body>

</html>
<script>
    let num = sum(10, 20);
    window.console.log(num);

    function sum(a, b) {
        return a + b;
    }


    let msg = function(text) {
        return 'say--->' + text;
    }
    let content = msg('我爱你');
    window.console.log(content);

    function eat(food) {
        window.console.log('吃' + food);
    }
</script>